<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title><script src="https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js"></script>
    <link href="https://cdn.jsdelivr.net/npm/animate.css@3.5.1" rel="stylesheet" type="text/css">
  </head>
  
  <body>
    <!-- 利用第三方animate.css自定义组件动画 
    enter-class
    enter-active-class
    enter-to-class (2.1.8+)
    leave-class
    leave-active-class
    leave-to-class (2.1.8+)
    -->
    <div id="app">
      <button @click="show=!show">按钮</button>
      <transition enter-active-class="animated tada" leave-active-class="animated bounceOutRight">
        <p v-if="show">hello vue</p>
      </transition>
    </div>
    <script>
      var app = new Vue({
        el: '#app',
        data: {
          show: true
        }
      })
    </script>
</body>
</html>